﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Manager/SearchMP.master" CodeBehind="CustomerSearch.aspx.cs" Inherits="Agile_E.CustomerSearch" %>

<asp:Content id="CustomerSearch" ContentPlaceHolderID="MPsearchmain" runat="server">
<div>
<h1>Customers:</h1></div>
<table>
    <tr>
    <td class="SearchTableCell" >First Name:</td><td><asp:TextBox ID="txtfname" runat="server"></asp:TextBox></td>
    <td class="SearchTableCell" style="padding-left:15px" >Last Name:</td><td><asp:TextBox ID="txtlname" runat="server"></asp:TextBox></td>
    </tr>
    
    <tr>
    <td class="SearchTableCell">Home Phone:</td>
    <td><asp:TextBox ID="txthphone" runat="server"></asp:TextBox>
    </td></tr>
    <tr>
    <td class="SearchTableCell">Cell Phone:</td>
    <td><asp:TextBox ID="txtCPhone" runat="server"></asp:TextBox>
    </td></tr>
</table>

<br />
<asp:Button ID="btnSearch" runat="server" Text="Search" onclick="btnSearch_Click" />&nbsp;
<asp:HyperLink ID="HLaddCust" runat="server" Text="Add New Customer" NavigateUrl="~/Manager/AddCustomer.aspx"></asp:HyperLink>
<br /><br />

<asp:GridView ID="grdCustomer" runat="server" BackColor="White" DataSourceID="srcCustomers"  AutoGenerateColumns="false"
        BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CssClass="CustGridStyle"
        GridLines="Vertical">
    <RowStyle CssClass="CustGridRowStyle" BackColor="#EEEEEE" ForeColor="Black" />
    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
    <AlternatingRowStyle BackColor="#DCDCDC" />
        <Columns>
            <asp:BoundField HeaderText="Last Name" DataField="Last_Name" />
            <asp:BoundField HeaderText="Middle Name" DataField="Middle_Name" />
            <asp:BoundField HeaderText="First Name" DataField="First_Name" />
            <asp:BoundField HeaderText="Home Phone" DataField="Home_Phone" />
            <asp:BoundField HeaderText="Cell_Phone" DataField="Work_Phone" />
            <asp:BoundField HeaderText="Address" DataField="Address" />
            <asp:HyperLinkField   DataNavigateUrlFields="C_ID" DataNavigateUrlFormatString="getCustomer.aspx?Customer_number={0}"
                 Text="Select" NavigateUrl="~/Manager/getCustomer.aspx" />
        </Columns> 
    
    </asp:GridView>
    
     <asp:SqlDataSource ID="srcCustomers" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TerraNetConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:TerraNetConnectionString.ProviderName %>" ></asp:SqlDataSource>
</asp:Content>